﻿using FluentMigrator;

namespace Rubikev.Rockface.Database.ForeignKeys
{
   /// <summary>
   /// Creates the recursive foreign key for the region to parent region
   /// </summary>
   [Migration(201106052126)]
   public class CreateRegionParentRegionToRegionForeignKey : CreateForeignKeyMigration
   {
      /// <summary>
      /// The name of the region table
      /// </summary>
      public override string FromTableName
      {
         get { return "Region"; }
      }

      /// <summary>
      /// The name of the region table
      /// </summary>
      public override string ToTableName
      {
         get { return "Region"; }
      }

      /// <summary>
      /// The name of the parent region ID column
      /// </summary>
      public override string FromTableColumn
      {
         get
         {
            return "ParentRegionId";
         }
      }
   }
}
